
/**
 * AppleIIGo
 * Chip Device class
 * (C) 2007 by Marc S. Ressl (mressl@umich.edu)
 * Released under the GPL
 */

#include <string.h>

#include "ChipDevice.h"

ChipDevice * ChipDevice::getInstance(char * chipDeviceType,
										   Motherboard * motherboard) {
//	if (!strcmp(auxSlotDeviceType, "ZIPCHIP4000"))
//		return new InternalAuxMemory(motherboard);
//	else if (!strcmp(auxSlotDeviceType, "ZIPCHIP8000"))
//		return new InternalAuxMemory(motherboard);
//	else
		return new ChipDevice(motherboard);
}

ChipDevice::ChipDevice(Motherboard * motherboard) :
Device(motherboard, "ChipDevice") {
}

void ChipDevice::onDevicesConnected() {
	timingGenerator = motherboard->getTimingGenerator();
}

UINT8 ChipDevice::readIo(UINT16 address) {
	return timingGenerator->readFloatingBus();
}

UINT8 ChipDevice::readIo(UINT16 address, UINT8 value) {
	return value;
}

void ChipDevice::writeIo(UINT16 address, UINT8 value) {
} 
